package top.hmtools.ckfinder.configuration;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

import top.hmtools.ckfinder.enums.FileAdapterType;

public class FileAdapterConfigurationImportSelector  implements ImportSelector {

	@Override
	public String[] selectImports(AnnotationMetadata importingClassMetadata) {
		FileAdapterType[] types = FileAdapterType.values();
		String[] imports = new String[types.length];
		for (int i = 0; i < types.length; i++) {
			imports[i] = FileAdapterTypeConfiguration.getConfigurationClass(types[i]);
		}
		return imports;
	}

}
